package com.mike.billingserver.form;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author xiaozefeng
 * @date 2018-12-19 11:43
 */
@Data
public class BillForm implements Serializable {

    private String id;

    @NotNull(message = "金额不能为空")
    @Min(value = 0, message = "金额不能为负数")
    private BigDecimal amount;

    @NotEmpty(message = "用户不能为空")
    private String use;

    @NotEmpty(message = "必须选择分类")
    private String category;

    private String happenedTime;

    private String inputHappenedTime;
}
